/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.kreig133.spine.simplemodel;

import com.kreig133.spine.abstractmodel.AbstractExperiment;
import java.util.List;

/**
 *
 * @author C.C.-fag
 */
public class SimpleExperiment  extends AbstractExperiment{

    protected double time;
    protected List<SimpleEvent> events;
    protected double step;

    public SimpleExperiment() {}

    public Double getTime() {
        return time;
    }

    public void setTime(Double experimentContinuance) {
        this.time = experimentContinuance;
    }

    public double getStep() {
        return step;
    }

    public void setStep(Double simulationStep) {
        this.step = simulationStep;
    }

    public List<SimpleEvent> getEvents() {
        return events;
    }

    public void setEvents(List<SimpleEvent> events) {
        this.events = events;
    }

    
    
    /**
     * Выдает следующий SimpleEvent, удаляя его из своего списка.
     * @return
     */
    public SimpleEvent getNextEvent() {
        if (events != null) {
            return events.isEmpty() ? null : events.remove(0);
        }
        return null;
    }
}
